#pragma once
#include

class 

//因为战斗场景的操作分为多种情况，写在原处比较麻烦，故单独列出一类用以操作光标
//注意，AI选择目标的行为也在这里面
class BattleCursor : 
public:
    BattleCursor();
    ~BattleCursor();

     *select_y_ = nullptr;
    MapSquareInt* select_layer_ = nullptr, *effect_layer_ = nullptr;

    Role* role_ = nullptr;
    Magic* magic_ = nullptr;
    int 
    void setRoleAndMagic(Role* r, Magic* m = nullptr, int l = 0);

    Head* head_selected_;
    //void setHead(Head* h) { head_selected_ = h; }
    Head* getHead() { return head_selected_; }

    UIStatus* ui_status_;
    UIStatus* getUIStatus() { return ui_status_; }

    int mode_ = Move;
    enum
    {
        Other = -1,
        Move,
        Action,
        Check,
    };
    void setMode(int m) { mode_ = m; }
    int getMode() { return mode_; }

    BattleScene* battle_scene_ = nullptr;
    void setBattleScene(BattleScene* b) { battle_scene_ = b; }

    void dealEvent(BP_Event& e) override;

    void dealMoveEvent(BP_Event& e);
    void dealActionEvent(BP_Event& e);

    void onEntrance() override;

    virtual void onPressedOK() override { exitWithResult(0); }
    virtual void onPressedCancel() override { exitWithResult(-1); }
private:
    Font() {}
    ~Font();
    static Font font_;
    std::map<int, BP_Texture*> buffer_;  //缓存所有已经画过的字体

    std::string fontnamec_ = "../game/font/chinese.ttf";
    std::string fontnamee_ = "../game/font/english.ttf";

    int calIndex(int size, uint16_t c) { return size 

    static Font* getInstance() { return &font_; };
    void draw(const std::string& text, int size, int x, int y, BP_Color color = { 255, 255, 255, 255 }, uint8_t alpha = 255);
    void drawWithBox(const std::string& text, int size, int x, int y, BP_Color color = { 255, 255, 255, 255 }, uint8_t alpha = 255, uint8_t alpha_box = 255);
};